package com.hyperfix.utils.common;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author JiangChunYu
 * 2024/3/23
 */
public class TimeUtil {
    private static final DateTimeFormatter TIME_FORMATTER_1 = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
    private static final DateTimeFormatter TIME_FORMATTER_2 = DateTimeFormatter.ofPattern("yyyy年MM月dd日HH时mm分ss秒");

    public static final int DAY_NUM_OF_WEEK = 7;
    public static final int HOUR_NUM_OF_DAY = 24;

    public static String format(LocalDateTime time) {
        return time.format(TIME_FORMATTER_1);
    }

    public static String formatInline(LocalDateTime time) {
        return time.format(TIME_FORMATTER_2);
    }
}
